#include "StdAfx.h"
#include "data_interface.h"
#include "datamodel.h"


bool get_instrument(const st_instrument_key& key, st_instrument& inst)
{
    return g_dv_instrument.get_by_key(key, inst);
}

bool get_instrument_by_index(const st_instrument_index& index, st_instrument& inst)
{
    return g_dv_instrument_id.get(index, inst);
}

bool get_depthmarketdata(const st_hq_key& key, st_hq& marketdata)
{
    return g_dv_hq.get_by_key(key, marketdata);
}

bool get_order(const st_order_key& key, st_order& order)
{
    return g_dv_order.get_by_key(key, order);
}

bool get_trade(const st_trade_key& key, st_trade& trade)
{
    return g_dv_trade.get_by_key(key, trade);
}

bool get_hold(const st_new_hold_key& key, st_new_hold& hold)
{
    return g_dv_new_hold.get_by_key(key, hold);
}

bool get_fund(const st_new_fund_key& key, st_new_fund& fund)
{
    return g_dv_new_fund.get_by_key(key, fund);
}

bool get_sto(const st_sto_key& key, st_sto& sto)
{
    return g_dv_sto.get_by_key(key, sto);
}

bool get_max_order_volume(const st_max_open_close_key& key, st_max_open_close& moc)
{
    return g_dv_max_open_close.get_by_key(key, moc);
}